package com.ay.weixin.fdc.boss.yongjin.domain;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CashFlow {
	private long id;
	
	private float cash;
	
	private long user_id;
	
	private long from_user_id;
	
	private long wxproject_id;
	
	private String reason;
	
	private long timestamp;

	private String ts_time;
	
	private long update_timestamp;
	
	private int flow_in;
	
	private int in_status;
	
	private int out_status;
	
	private float cash_total;
	
	private String logs;
	
	public static final int FLOW_IN=1;
	
	public static final int FLOW_OUT=2;
	
	public static final int IN_STATUS_IN=1;
	
	public static final int IN_STATUS_APPLY_OUT=2;
	
	public static final int IN_STATUS_OUT=3;
	
	public static final int OUT_STATUS_APPLY=1;
	
	public static final int OUT_STATUS_APPROVE=2;
	
	public static final int OUT_STATUS_TRANSFERED=3;
	
	public static final int OUT_STATUS_CONFIRMED=4;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public float getCash() {
		return cash;
	}

	public void setCash(float cash) {
		this.cash = cash;
	}

	public long getUser_id() {
		return user_id;
	}

	public void setUser_id(long user_id) {
		this.user_id = user_id;
	}

	public long getFrom_user_id() {
		return from_user_id;
	}

	public void setFrom_user_id(long from_user_id) {
		this.from_user_id = from_user_id;
	}


	public long getUpdate_timestamp() {
		return update_timestamp;
	}

	public void setUpdate_timestamp(long update_timestamp) {
		this.update_timestamp = update_timestamp;
	}

	public String getUpdate_timestamp_str(){
		if(update_timestamp>0)return new Date(update_timestamp).toLocaleString();
		return "";
	}
	
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		this.ts_time=formatter.format(new Date(timestamp));
	}

	public int getFlow_in() {
		return flow_in;
	}

	public void setFlow_in(int flow_in) {
		this.flow_in = flow_in;
	}

	public int getIn_status() {
		return in_status;
	}

	public void setIn_status(int in_status) {
		this.in_status = in_status;
	}

	public float getCash_total() {
		return cash_total;
	}

	public void setCash_total(float cash_total) {
		this.cash_total = cash_total;
	}

	public int getOut_status() {
		return out_status;
	}

	public void setOut_status(int out_status) {
		this.out_status = out_status;
	}

	public String getTs_time() {
		return ts_time;
	}

	public void setTs_time(String ts_time) {
		this.ts_time = ts_time;
	}

	public String getLogs() {
		if(logs==null)return "";
		return logs;
	}

	public void setLogs(String logs) {
		this.logs = logs;
	}

	public long getWxproject_id() {
		return wxproject_id;
	}

	public void setWxproject_id(long wxproject_id) {
		this.wxproject_id = wxproject_id;
	}


	
	
	
}
